namespace CSharpPro._0918;

public class Demo
{
    public class Phone
    {
        public string Brand { get; set; }
    
        // 重量属性
        public double Weight { get; set; }
    
        // 后置摄像头像素
        public long Camera { get; set; }
        // 价格属性
        public decimal Price { get; set; }
        public Phone(string brand, double weight, long camera, decimal price)
        {
            Brand = brand;
            Weight = weight;
            Camera = camera;
            Price = price;
        }
        public void DisplayInfo()
        {
            Console.WriteLine("手机信息：");
            Console.WriteLine($"品牌：{Brand}");
            Console.WriteLine($"重量：{Weight}g");
            Console.WriteLine($"后置摄像头像素：{Camera:N0}"); 
            Console.WriteLine($"价格：¥{Price}");
        }
    }
   
}